package StudyCode.summary.myfile;

import java.io.File;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class GettingAnAbsoluteFilenamePathFromRelativeFilenamePath {
	public static void main(String[] args) {
		File file = new File("filename.txt");
		file = file.getAbsoluteFile();
		System.out.println(file);
		file = new File("dir" + File.separatorChar + "filename.txt");
		file = file.getAbsoluteFile();
		System.out.println(file);
		file = new File(".." + File.separatorChar + "filename.txt");
		file = file.getAbsoluteFile();
		System.out.println(file);
	}
}
